package gestioneAccount.web.beans;

import gestione.mgrCliente.*;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import dataTransferOblect.ClienteDTO;



@ManagedBean(name="registrazioneBean")
@RequestScoped
public class RegistrazioneBean {
	
	@EJB
	private ClienteMgr clienteMgr;

	private ClienteDTO cliente;
	
	
	public RegistrazioneBean() {
		cliente = new ClienteDTO();
		
	}

	public ClienteDTO getCliente() {
		return cliente;
	}

	public void setCliente(ClienteDTO cliente) {
		this.cliente = cliente;
	}
	
	
	public String registrazione() {
		clienteMgr.save(cliente);
		return "cliente/index?faces-redirect=true";
	}

		
	

}

